home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / BOOPSI / GI1 / Include / intuition / classes.i < prev    next >
Encoding:
Text File  |  1999-10-27  |  2.9 KB  |  94 lines

  1.     IFND INTUITION_CLASSES_I
  2. INTUITION_CLASSES_I SET 1
  3. **
  4. **  $Id: classes.i,v 40.0 94/02/15 17:46:46 davidj Exp Locker: davidj $
  5. **
  6. **  Only used by class implementors
  7. **
  8. **  (C) Copyright 1989-1999 Amiga, Inc.
  9. **        All Rights Reserved
  10. **
  11.  
  12. ;******************************************************************************
  13.  
  14.     IFND EXEC_TYPES_I
  15.     INCLUDE "exec/types.i"
  16.     ENDC
  17.  
  18.     IFND EXEC_LIBRARIES_I
  19.     INCLUDE "exec/libraries.i"
  20.     ENDC
  21.  
  22.     IFND UTILITY_HOOKS_I
  23.     INCLUDE "utility/hooks.i"
  24.     ENDC
  25.  
  26.     IFND INTUITION_CLASSUSR_I
  27.     INCLUDE "intuition/classusr.i"
  28.     ENDC
  29.  
  30. ;******************************************************************************
  31. ;***************** "White Box" access to struct IClass ************************
  32. ;******************************************************************************
  33.  
  34.  STRUCTURE ICLASS,0
  35.     STRUCT     cl_Dispatcher,h_SIZEOF        ; Class dispatcher
  36.     ULONG     cl_Reserved            ; Must be 0
  37.     APTR     cl_Super            ; Pointer to superclass
  38.     APTR     cl_ID                ; Class ID
  39.  
  40.     UWORD     cl_InstOffset            ; Offset of instance data
  41.     UWORD     cl_InstSize            ; Size of instance data
  42.  
  43.     ULONG     cl_UserData            ; Class global data
  44.     ULONG     cl_SubclassCount        ; Number of subclasses
  45.     ULONG     cl_ObjectCount            ; Number of objects
  46.     ULONG     cl_Flags
  47.  
  48.     ; no iclass_SIZEOF because only Intuition allocates these
  49.  
  50. ;******************************************************************************
  51.  
  52. ; defined values of cl_Flags
  53. CLB_INLIST EQU 0
  54. CLF_INLIST EQU $00000001    ; class in in public class list
  55.  
  56. ; see classes.h for common calculations (sorry, no macros yet)
  57.  
  58. ;*****************************************************************************
  59. ;***************** "White box" access to struct _Object **********************
  60. ;*****************************************************************************
  61.  
  62. ; We have this, the instance data of the root class, PRECEDING the "object".
  63. ; This is so that Gadget objects are Gadget pointers, and so on.  If this
  64. ; structure grows, it will always have o_Class at the end, so the macro
  65. ; OCLASS(o) will always have the same offset back from the pointer returned
  66. ; from NewObject().
  67. ;
  68. ; This data structure is subject to change.  Do not use the o_Node embedded
  69. ; structure.
  70.  
  71.  STRUCTURE _Object,0
  72.     STRUCT     o_Node,MLN_SIZE
  73.     APTR     o_Class
  74.  
  75.     ; this value may change but difference between it and offset of o_Class
  76.     ; will remain constant
  77.     LABEL     _object_SIZEOF
  78.  
  79. ;******************************************************************************
  80.  
  81. ; BOOPSI class libraries should use this structure as the base for their
  82. ; library data.  This allows developers to obtain the class pointer for
  83. ; performing object-less inquiries.
  84.  
  85.   STRUCTURE ClassLibrary,0
  86.     STRUCT     cl_Lib,LIB_SIZE    ; Embedded library
  87.     UWORD     cl_Pad            ; Align the structure
  88.     APTR     cl_Class        ; Class pointer
  89.     LABEL     ClassLibrary_SIZEOF
  90.  
  91. ;******************************************************************************
  92.  
  93.     ENDC
  94.